{temp('admin/head')}
<!-- 以下是art弹窗js -->
<script src="{$adstyle}/js/art/artDialog.source.js?skin=opera"></script>
<script src="{$adstyle}/js/art/plugins/iframeTools.source.js"></script>

</head>
<body class="page-body">
		
		{temp('admin/left')}
			
			{temp('admin/top')}
			
			{if(@$user['id'])}
			<div class="row">
				<div class="col-sm-12">
					
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">{$tit}</h3>
						</div>
						<div class="panel-body">
							
							<form role="form" class="form-horizontal">
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="phone">手机</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="phone" value="{if(@$user['phone'])}{$user['phone']}{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="email">邮箱</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="email" value="{if(@$user['email'])}{$user['email']}{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="jifen">积分余额</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="jifen" value="{if(@$user['jifen'])}{$user['jifen']}{else}0{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="pay">积分总值</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="pay" value="{if(@$user['pay'])}{$user['pay']}{else}0{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="slevel">是否接受过线上培训</label>
									<div class="col-sm-10">
										<div class="radio">
											<label>
												<input type="radio" name="slevel" value="1" {if(@$user['slevel'] == 1)}checked{/if}>
												是
											</label>
										</div>
										<div class="radio">
											<label>
												<input type="radio" name="slevel" value="0" {if(@$user['slevel'] == 0)}checked{/if}>
												否
											</label>
										</div>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="vlevel">是否接受过线下培训</label>
									<div class="col-sm-10">
										<div class="radio">
											<label>
												<input type="radio" name="vlevel" value="1" {if(@$user['vlevel'] == 1)}checked{/if}>
												是
											</label>
										</div>
										<div class="radio">
											<label>
												<input type="radio" name="vlevel" value="0" {if(@$user['vlevel'] == 0)}checked{/if}>
												否
											</label>
										</div>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="touxiang">头像</label>
									<div class="col-sm-10">
										<img src="{if(@$user['base']['touxiang'])}{photo({$user['base']['touxiang']})}{/if}" id="ii" width="48" />
                                    	<input type="hidden" class="form-control" id="touxiang" value="{if(@$user['base']['touxiang'])}{$user['base']['touxiang']}{/if}"/>
                                    	<button type="button" class="btn btn-gray" onclick="sctp('touxiang','ii')">点击上传</button>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="name">姓名</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="name" value="{if(@$user['base']['name'])}{$user['base']['name']}{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="sex">性别</label>
									<div class="col-sm-10">
										<div class="radio">
											<label>
												<input type="radio" name="sex" value="1" {if(@$user['base']['sex'] == 1)}checked{/if}>
												男
											</label>
										</div>
										<div class="radio">
											<label>
												<input type="radio" name="sex" value="2" {if(@$user['base']['sex'] == 2)}checked{/if}>
												女
											</label>
										</div>
										<div class="radio">
											<label>
												<input type="radio" name="sex" value="0" {if(@$user['base']['sex'] == 0)}checked{/if}>
												保密
											</label>
										</div>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="cstime">出生日期</label>
									<div class="col-sm-10">
										<input type="text" class="form-control datepicker" id="cstime" value="{if(@$user['base']['cstime'])}{code(echo date('Y-m-d',$user['base']['cstime']))}{/if}" data-format="yyyy-mm-dd" data-start-date="" data-end-date="-1d">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label">现居住地</label>
									<div class="col-sm-10">
										<div class="col-sm-2">
										<select class="form-control" id="xsheng" onchange="gbdz(this.value,'xshi','xqu')">
											<option value="0">请选择</option>
						        			{if(@$sh)}
						        			{foreach($sh as $k=>$v)}
						        			<option {if(@$user['base']['xsheng'] == $v['area_id'])}selected="selected"{/if} value="{$v['area_id']}">{$v['area_name']}</option>
						        			{/foreach}
						        			{/if}
										</select>
										</div>
										<div class="col-sm-2">
						        		<select class="form-control" id="xshi" onchange="gbdz(this.value,'xqu','')">
						        			<option value="0">请选择</option>
						        			{if(@$shi)}
						        			{foreach($shi as $k=>$v)}
						        			<option {if(@$user['base']['xshi'] == $v['area_id'])}selected="selected"{/if} value="{$v['area_id']}">{$v['area_name']}</option>
						        			{/foreach}
						        			{/if}
						        		</select>
						        		</div>
						        		<div class="col-sm-2">
						        		<select class="form-control" id="xqu">
						        			<option value="0">请选择</option>
						        			{if(@$qu)}
						        			{foreach($qu as $k=>$v)}
						        			<option {if(@$user['base']['xqu'] == $v['area_id'])}selected="selected"{/if} value="{$v['area_id']}">{$v['area_name']}</option>
						        			{/foreach}
						        			{/if}
						        		</select>
						        		</div>
						        		<div class="col-sm-4">
                                    	<input type="text" class="form-control" id="xsq" value="{if(@$user['base']['xsq'])}{$user['base']['xsq']}{/if}"/>
										</div>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="bytime">毕业时间</label>
									<div class="col-sm-10">
										<input type="text" class="form-control datepicker" id="bytime" value="{if(@$user['base']['bytime'])}{code(echo date('Y-m-d',$user['base']['bytime']))}{/if}" data-format="yyyy-mm-dd" data-start-date="" data-end-date="-0d">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="minzu">民族</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="minzu" value="{if(@$user['base']['minzu'])}{$user['base']['minzu']}{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label">户口所在地</label>
									<div class="col-sm-10">
										<div class="col-sm-2">
										<select class="form-control" id="hksheng" onchange="gbdz(this.value,'hkshi','hkqu')">
											<option value="0">请选择</option>
						        			{if(@$sh)}
						        			{foreach($sh as $k=>$v)}
						        			<option {if(@$user['base']['hksheng'] == $v['area_id'])}selected="selected"{/if} value="{$v['area_id']}">{$v['area_name']}</option>
						        			{/foreach}
						        			{/if}
										</select>
										</div>
										<div class="col-sm-2">
						        		<select class="form-control" id="hkshi" onchange="gbdz(this.value,'xqu','')">
						        			<option value="0">请选择</option>
						        			{if(@$hkshi)}
						        			{foreach($hkshi as $k=>$v)}
						        			<option {if(@$user['base']['hkshi'] == $v['area_id'])}selected="selected"{/if} value="{$v['area_id']}">{$v['area_name']}</option>
						        			{/foreach}
						        			{/if}
						        		</select>
						        		</div>
						        		<div class="col-sm-2">
						        		<select class="form-control" id="hkqu">
						        			<option value="0">请选择</option>
						        			{if(@$hkqu)}
						        			{foreach($hkqu as $k=>$v)}
						        			<option {if(@$user['base']['hkqu'] == $v['area_id'])}selected="selected"{/if} value="{$v['area_id']}">{$v['area_name']}</option>
						        			{/foreach}
						        			{/if}
						        		</select>
						        		</div>
						        		<div class="col-sm-4">
                                    	<input type="text" class="form-control" id="hk" value="{if(@$user['base']['hk'])}{$user['base']['hk']}{/if}"/>
										</div>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="sfzh">身份证号</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="sfzh" value="{if(@$user['base']['sfzh'])}{$user['base']['sfzh']}{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="hyzt">婚姻状态</label>
									<div class="col-sm-10">
										<div class="radio">
											<label>
												<input type="radio" name="hyzt" value="0" {if(@$user['base']['hyzt'] == 0)}checked{/if}>
												未婚
											</label>
										</div>
										<div class="radio">
											<label>
												<input type="radio" name="hyzt" value="1" {if(@$user['base']['hyzt'] == 1)}checked{/if}>
												已婚
											</label>
										</div>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="byyx">毕业院校</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="byyx" value="{if(@$user['base']['byyx'])}{$user['base']['byyx']}{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="xueli">学历</label>
									<div class="col-sm-10">
										<select class="form-control" id="xueli">
						        			<option value="0">请选择</option>
						        			{if(@$_xueli)}
						        			{foreach($_xueli as $k=>$v)}
						        			<option {if(@$user['base']['xueli'] == $k)}selected="selected"{/if} value="{$k}">{$v}</option>
						        			{/foreach}
						        			{/if}
						        		</select>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="zhuanye">主修专业</label>
									<div class="col-sm-10">
										<select class="form-control" id="zhuanye">
						        			<option value="0">请选择</option>
						        			{if(@$zhuany)}
						        			{foreach($zhuany as $k=>$v)}
						        			<option {if(@$user['base']['zhuanye'] == $v['id'])}selected="selected"{/if} value="{$v['id']}">{$v['name']}</option>
						        			{/foreach}
						        			{/if}
						        		</select>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="waiyu">外语语种</label>
									<div class="col-sm-10">
										<select class="form-control" id="waiyu">
						        			{if(@$_waiyu)}
						        			{foreach($_waiyu as $k=>$v)}
						        			<option {if(@$user['base']['waiyu'] == $k)}selected="selected"{/if} value="{$k}">{$v}</option>
						        			{/foreach}
						        			{/if}
						        		</select>
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="zzmm">政治面貌</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="zzmm" value="{if(@$user['base']['zzmm'])}{$user['base']['zzmm']}{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="qq">QQ</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="qq" value="{if(@$user['base']['qq'])}{$user['base']['qq']}{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="grzy">个人主页</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" id="grzy" value="{if(@$user['base']['grzy'])}{$user['base']['grzy']}{/if}">
									</div>
								</div>
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<div class="col-sm-10">
										<button class="btn btn-info btn-single pull-right" onClick="tijiao()" type="button">提交</button>
									</div>
								</div>
							</form>
							
						</div>
					</div>
					
				</div>
			</div>
			{/if}
			
			<script>
			function gbdz(id,nn,cc){//改变地址
				$.post('{$_url}/admin/?act=get_diqu',{id:id},function(data){
					$("#"+nn).html(data);
					if(cc != ''){
						$("#"+cc).html('<option value="0">请选择</option>');
					}
				});
			}
			function sctp(id,src){//上传头像
				art.dialog.open('{$_url}/admin/?act=upfile&id='+id+'&type=1&src='+src+'{$gnpd}',{title:'',width:'600px',lock:true},false);
			}
			function tijiao(){
				var phone = $("#phone").val();
				var email = $("#email").val();
				var jifen = $("#jifen").val();
				var pay = $("#pay").val();
				var slevel = $('input:radio[name=slevel]:checked').val();
				var vlevel = $('input:radio[name=vlevel]:checked').val();
				var touxiang = $("#touxiang").val();
				var name = $("#name").val();
				var sex = $('input:radio[name=sex]:checked').val();
				var cstime = $("#cstime").val();
				var xsheng = $("#xsheng").val();
				var xshi = $("#xshi").val();
				var xqu = $("#xqu").val();
				var xsq = $("#xsq").val();
				var bytime = $("#bytime").val();
				var minzu = $("#minzu").val();
				var hksheng = $("#hksheng").val();
				var hkshi = $("#hkshi").val();
				var hkqu = $("#hkqu").val();
				var hk = $("#hk").val();
				var sfzh = $("#sfzh").val();
				var hyzt = $('input:radio[name=hyzt]:checked').val();
				var byyx = $("#byyx").val();
				var xueli = $("#xueli").val();
				var zhuanye = $("#zhuanye").val();
				var waiyu = $("#waiyu").val();
				var zzmm = $("#zzmm").val();
				var qq = $("#qq").val();
				var grzy = $("#grzy").val();
				$.post('{$_url}/admin/?act=recruit&met=user_bj{$gnpd}',{id:{$user['id']},phone:phone,email:email,jifen:jifen,
					pay:pay,slevel:slevel,vlevel:vlevel,touxiang:touxiang,name:name,sex:sex,cstime:cstime,xsheng:xsheng,xshi:xshi,xqu:xqu,
					xsq:xsq,bytime:bytime,minzu:minzu,hksheng:hksheng,hkshi:hkshi,hkqu:hkqu,hk:hk,sfzh:sfzh,hyzt:hyzt,
					byyx:byyx,xueli:xueli,zhuanye:zhuanye,waiyu:waiyu,zzmm:zzmm,qq:qq,grzy:grzy},function(data){
						showAjaxModal(data);
						if(data == '修改成功'){
							$("#queding").attr("onclick","tiao('{$_url}/admin/?act=recruit&met=user_update&id={$user['id']}{$gnpd}')");
						}
				});
			}
			function showAjaxModal(data){//ajax弹窗
				jQuery('#modal-7').modal('show', {backdrop: 'static'});
				jQuery('#modal-7 .modal-body').html(data);
			}
			function tiao(url){//创建成功跳转
				window.location.href=url;
			}
			</script>
			
		{temp('admin/foot')}
	
	<!-- Modal 7 (Ajax Modal)-->
	<div class="modal fade" id="modal-7">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title">{$tit}</h4>
				</div>
				<div class="modal-body">
					Content is loading...
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-info" data-dismiss="modal" id="queding">确定</button>
				</div>
			</div>
		</div>
	</div>
	
	<!-- Bottom Scripts -->
	<script src="{$adstyle}/js/bootstrap.min.js"></script>
	<script src="{$adstyle}/js/TweenMax.min.js"></script>
	<script src="{$adstyle}/js/resizeable.js"></script>
	<script src="{$adstyle}/js/joinable.js"></script>
	<script src="{$adstyle}/js/xenon-api.js"></script>
	<script src="{$adstyle}/js/xenon-toggles.js"></script>

	<!-- Imported scripts on this page -->
	<script src="{$adstyle}/js/datepicker/bootstrap-datepicker.js"></script>

	<!-- JavaScripts initializations and stuff -->
	<script src="{$adstyle}/js/xenon-custom.js"></script>

</body>
</html>